﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Students
{
    class Student
    {
        public Student(string name, int facultyNumber)
        {
            this.Name = name;
            this.FacultyNumber = facultyNumber;
        }

        public string Name { get; set; }
        public int FacultyNumber { get; set; }
    }

    class Course
    {
        public Dictionary<int, Student> Students { get; set; }
        
        public Course()
        {
            Students = new Dictionary<int, Student>();
        }

        public void AddStudent(string name, int facultyNumber)
        {
            if (name == null || name.Equals("") ||name.Equals(" "))
            {
                throw new ArgumentException("Name should not be empty");
            }
            if (facultyNumber < 10000 || facultyNumber > 99999)
            {
                throw new ArgumentException("Faculty number should be between 10 000 and 99 999");
            }
            if (Students.ContainsKey(facultyNumber))
            {
                throw new ArgumentException("Faculty number already exists in the database");
            }
            if (Students.Count >= 30)
            {
                throw new ArgumentException("The course is full");
            }
            Students[facultyNumber] = new Student(name, facultyNumber);
        }

        public void RemoveStudent(int facultyNumber)
        {
            if (Students.ContainsKey(facultyNumber) == false)
            {
                throw new ArgumentException("The student is not enrolled in this course");
            }
            Students.Remove(facultyNumber);
        }
    }
    class Program
    {
        static void Main(string[] args)
        {
        }
    }
}
